package com.antoco.operation.bigscreen.model.dto;

import javax.validation.constraints.Digits;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel(value="SuiziSensorNumDTO")
public class SuiziSensorNumDTO {

    @NotNull(message = "总数不能为空")
    @Min(value = 0, message = "总数必须是正整数")
    @Digits(integer = 10, fraction = 0, message = "总数必须是整数")
    @ApiModelProperty(value = "总数", example="100")
    private String allNum;

    @NotNull(message = "CH2传感器数不能为空")
    @Min(value = 0, message = "CH2传感器数必须是正整数")
    @Digits(integer = 10, fraction = 0, message = "CH2传感器数必须是整数")
    @ApiModelProperty(value = "CH2传感器数", example="100")
    private String ch2Num;

    @NotNull(message = "H2S传感器数不能为空")
    @Min(value = 0, message = "H2S传感器数必须是正整数")
    @Digits(integer = 10, fraction = 0, message = "H2S传感器数必须是整数")
    @ApiModelProperty(value = "H2S传感器数", example="100")
    private String h2sNum;

    @NotNull(message = "CO传感器数不能为空")
    @Min(value = 0, message = "CO传感器数必须是正整数")
    @Digits(integer = 10, fraction = 0, message = "CO传感器数必须是整数")
    @ApiModelProperty(value = "CO传感器数", example="100")
    private String coNum;

    @NotNull(message = "PH传感器数不能为空")
    @Min(value = 0, message = "PH传感器数必须是正整数")
    @Digits(integer = 10, fraction = 0, message = "PH传感器数必须是整数")
    @ApiModelProperty(value = "PH传感器数", example="100")
    private String phNum;

    @NotNull(message = "正常数占比不能为空")
    @Min(value = 0, message = "正常数占比必须是正数")
    @Max(value = 1, message = "正常数占比必须小于1")
    @ApiModelProperty(value = "正常数占比", example="0.2")
    private String normalZb;

    @NotNull(message = "预警数占比不能为空")
    @Min(value = 0, message = "预警数占比必须是正数")
    @Max(value = 1, message = "预警数占比必须小于1")
    @ApiModelProperty(value = "预警数占比", example="0.2")
    private String alarmZb;

    @NotNull(message = "告警数占比不能为空")
    @Min(value = 0, message = "告警数占比必须是正整数")
    @Max(value = 1, message = "告警数占比必须小于1")
    @ApiModelProperty(value = "告警数占比", example="0.2")
    private String warnZb;
}